package com.ykq.permission.controller;

import com.ykq.permission.service.PermissionService;
import com.ykq.pojo.vo.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @program: qy151-education-parent
 * @description:
 * @author: 闫克起2
 * @create: 2022-08-29 11:10
 **/
@RestController
@RequestMapping("permission/permission")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;

    @GetMapping("/leftPermission")
    public CommonResult leftPermission(HttpServletRequest request){
        String token = request.getHeader("token");
        return  permissionService.selectLeftPermission(token);
    }

}






















